Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix running app-store-connect get-certificate without certificate private key #337

Merged

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Aug 23, 2023

When running app-store-connect get-certificate <certificate-id> without --certificate-key argument then the action crashes with the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/codemagic/cli/cli_app.py", line 206, in invoke_cli
    CliApp._running_app._invoke_action(args)
  File "/usr/local/lib/python3.11/site-packages/codemagic/cli/cli_app.py", line 163, in _invoke_action
    return cli_action(**action_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/codemagic/cli/cli_app.py", line 458, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/codemagic/tools/app_store_connect.py", line 706, in get_certificate
    assert private_key is not None
           ^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Ceritficate key is not necessary unless the certificate is to be saved. Changes in this PR remove the assertion that is causing the action to fail.

Updated actions

  • app-store-connect get-certificate

@priitlatt priitlatt added the bug Something isn't working label Aug 23, 2023
@priitlatt priitlatt marked this pull request as ready for review August 23, 2023 12:15
@priitlatt priitlatt merged commit 6fa250a into master Aug 23, 2023
@priitlatt priitlatt deleted the bugfix/app-store-connect-get-certificate-without-key branch August 23, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant